package com.venus.common.dao;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Query;

import com.venus.common.utils.ConditionUtil;
import com.venus.component.page.PageInfo;

public interface IBaseDAO {

	public <T> T getModel(Class<T> clazz,Serializable id);
	public <T> T loadModel(Class<T> clazz, Serializable id);
	public void saveModel(Object obj);
	public void updateModel(Object obj);
	public void saveOrUpdateModel(Object obj);
	public void deleteModel(Object obj);
	public List exeHql(String strHQL);
	public List exeHql(String strHQL, List<ConditionUtil> lstConditionUtils);
	public List pageQuery(final String hql, final Object[] bindValue, final Integer first, final Integer count);
	public Query createQuery(String queryString, Object... values);
	public List find(String hql, Object... values);
    public void delete(String strHql, Object... values);
    public Long exeCountHql(String strHQL, Object... values);
    
    public PageInfo getPageInfo(String strCountHql, String strRecordHql, List<ConditionUtil> lstConditionUtils, int iPageRecord, int iCurPage);
}
